package com.lglbc.day1;

/**
 * @Description TODO
 * @Author 乐哥聊编程
 * @Date 2022/11/13 10:52
 */
class A {
    public static int a=10;
    public A() {
        System.out.println("A 构造方法");
    }
    {
        System.out.println("执行A 代码块");
    }
    static {
        System.out.println("A static");
    }
}
class B extends A {
    public static int c=20;
    {
        System.out.println("执行B 代码块");
    }
    public B() {
        System.out.println("B 构造方法");
    }

    static {
        System.out.println("B static");
    }
}

public class TestJVMInit{
    public static void main(String[] args) {
//        System.out.println(B.c);
        B b = new B();
        B b2 = new B();
    }
}

